/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3.impl;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.hl7.v3.FrameType;
import org.hl7.v3.RulesType;
import org.hl7.v3.StrucDocCaption;
import org.hl7.v3.StrucDocCol;
import org.hl7.v3.StrucDocColgroup;
import org.hl7.v3.StrucDocTable;
import org.hl7.v3.StrucDocTbody;
import org.hl7.v3.StrucDocTfoot;
import org.hl7.v3.StrucDocThead;
import org.hl7.v3.V3Package;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Struc Doc Table</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getCaption <em>Caption</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getCol <em>Col</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getColgroup <em>Colgroup</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getThead <em>Thead</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getTfoot <em>Tfoot</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getTbody <em>Tbody</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getBorder <em>Border</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getCellpadding <em>Cellpadding</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getCellspacing <em>Cellspacing</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getFrame <em>Frame</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getID <em>ID</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getLanguage <em>Language</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getRules <em>Rules</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getStyleCode <em>Style Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getSummary <em>Summary</em>}</li>
 *   <li>{@link org.hl7.v3.impl.StrucDocTableImpl#getWidth <em>Width</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class StrucDocTableImpl extends EObjectImpl implements StrucDocTable {
	/**
	 * The cached value of the '{@link #getCaption() <em>Caption</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCaption()
	 * @generated
	 * @ordered
	 */
	protected StrucDocCaption caption;

	/**
	 * The cached value of the '{@link #getCol() <em>Col</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCol()
	 * @generated
	 * @ordered
	 */
	protected EList<StrucDocCol> col;

	/**
	 * The cached value of the '{@link #getColgroup() <em>Colgroup</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getColgroup()
	 * @generated
	 * @ordered
	 */
	protected EList<StrucDocColgroup> colgroup;

	/**
	 * The cached value of the '{@link #getThead() <em>Thead</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getThead()
	 * @generated
	 * @ordered
	 */
	protected StrucDocThead thead;

	/**
	 * The cached value of the '{@link #getTfoot() <em>Tfoot</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTfoot()
	 * @generated
	 * @ordered
	 */
	protected StrucDocTfoot tfoot;

	/**
	 * The cached value of the '{@link #getTbody() <em>Tbody</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTbody()
	 * @generated
	 * @ordered
	 */
	protected EList<StrucDocTbody> tbody;

	/**
	 * The default value of the '{@link #getBorder() <em>Border</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBorder()
	 * @generated
	 * @ordered
	 */
	protected static final String BORDER_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getBorder() <em>Border</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBorder()
	 * @generated
	 * @ordered
	 */
	protected String border = BORDER_EDEFAULT;

	/**
	 * The default value of the '{@link #getCellpadding() <em>Cellpadding</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCellpadding()
	 * @generated
	 * @ordered
	 */
	protected static final String CELLPADDING_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getCellpadding() <em>Cellpadding</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCellpadding()
	 * @generated
	 * @ordered
	 */
	protected String cellpadding = CELLPADDING_EDEFAULT;

	/**
	 * The default value of the '{@link #getCellspacing() <em>Cellspacing</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCellspacing()
	 * @generated
	 * @ordered
	 */
	protected static final String CELLSPACING_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getCellspacing() <em>Cellspacing</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCellspacing()
	 * @generated
	 * @ordered
	 */
	protected String cellspacing = CELLSPACING_EDEFAULT;

	/**
	 * The default value of the '{@link #getFrame() <em>Frame</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFrame()
	 * @generated
	 * @ordered
	 */
	protected static final FrameType FRAME_EDEFAULT = FrameType.VOID;

	/**
	 * The cached value of the '{@link #getFrame() <em>Frame</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFrame()
	 * @generated
	 * @ordered
	 */
	protected FrameType frame = FRAME_EDEFAULT;

	/**
	 * This is true if the Frame attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean frameESet;

	/**
	 * The default value of the '{@link #getID() <em>ID</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getID()
	 * @generated
	 * @ordered
	 */
	protected static final String ID_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getID() <em>ID</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getID()
	 * @generated
	 * @ordered
	 */
	protected String iD = ID_EDEFAULT;

	/**
	 * The default value of the '{@link #getLanguage() <em>Language</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLanguage()
	 * @generated
	 * @ordered
	 */
	protected static final String LANGUAGE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getLanguage() <em>Language</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLanguage()
	 * @generated
	 * @ordered
	 */
	protected String language = LANGUAGE_EDEFAULT;

	/**
	 * The default value of the '{@link #getRules() <em>Rules</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRules()
	 * @generated
	 * @ordered
	 */
	protected static final RulesType RULES_EDEFAULT = RulesType.NONE;

	/**
	 * The cached value of the '{@link #getRules() <em>Rules</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRules()
	 * @generated
	 * @ordered
	 */
	protected RulesType rules = RULES_EDEFAULT;

	/**
	 * This is true if the Rules attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean rulesESet;

	/**
	 * The default value of the '{@link #getStyleCode() <em>Style Code</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getStyleCode()
	 * @generated
	 * @ordered
	 */
	protected static final List<String> STYLE_CODE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getStyleCode() <em>Style Code</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getStyleCode()
	 * @generated
	 * @ordered
	 */
	protected List<String> styleCode = STYLE_CODE_EDEFAULT;

	/**
	 * The default value of the '{@link #getSummary() <em>Summary</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSummary()
	 * @generated
	 * @ordered
	 */
	protected static final String SUMMARY_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getSummary() <em>Summary</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSummary()
	 * @generated
	 * @ordered
	 */
	protected String summary = SUMMARY_EDEFAULT;

	/**
	 * The default value of the '{@link #getWidth() <em>Width</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getWidth()
	 * @generated
	 * @ordered
	 */
	protected static final String WIDTH_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getWidth() <em>Width</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getWidth()
	 * @generated
	 * @ordered
	 */
	protected String width = WIDTH_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected StrucDocTableImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return V3Package.eINSTANCE.getStrucDocTable();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public StrucDocCaption getCaption() {
		return caption;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetCaption(StrucDocCaption newCaption, NotificationChain msgs) {
		StrucDocCaption oldCaption = caption;
		caption = newCaption;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__CAPTION, oldCaption, newCaption);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCaption(StrucDocCaption newCaption) {
		if (newCaption != caption) {
			NotificationChain msgs = null;
			if (caption != null)
				msgs = ((InternalEObject)caption).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.STRUC_DOC_TABLE__CAPTION, null, msgs);
			if (newCaption != null)
				msgs = ((InternalEObject)newCaption).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.STRUC_DOC_TABLE__CAPTION, null, msgs);
			msgs = basicSetCaption(newCaption, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__CAPTION, newCaption, newCaption));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<StrucDocCol> getCol() {
		if (col == null) {
			col = new EObjectContainmentEList<StrucDocCol>(StrucDocCol.class, this, V3Package.STRUC_DOC_TABLE__COL);
		}
		return col;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<StrucDocColgroup> getColgroup() {
		if (colgroup == null) {
			colgroup = new EObjectContainmentEList<StrucDocColgroup>(StrucDocColgroup.class, this, V3Package.STRUC_DOC_TABLE__COLGROUP);
		}
		return colgroup;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public StrucDocThead getThead() {
		return thead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetThead(StrucDocThead newThead, NotificationChain msgs) {
		StrucDocThead oldThead = thead;
		thead = newThead;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__THEAD, oldThead, newThead);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setThead(StrucDocThead newThead) {
		if (newThead != thead) {
			NotificationChain msgs = null;
			if (thead != null)
				msgs = ((InternalEObject)thead).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.STRUC_DOC_TABLE__THEAD, null, msgs);
			if (newThead != null)
				msgs = ((InternalEObject)newThead).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.STRUC_DOC_TABLE__THEAD, null, msgs);
			msgs = basicSetThead(newThead, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__THEAD, newThead, newThead));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public StrucDocTfoot getTfoot() {
		return tfoot;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetTfoot(StrucDocTfoot newTfoot, NotificationChain msgs) {
		StrucDocTfoot oldTfoot = tfoot;
		tfoot = newTfoot;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__TFOOT, oldTfoot, newTfoot);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTfoot(StrucDocTfoot newTfoot) {
		if (newTfoot != tfoot) {
			NotificationChain msgs = null;
			if (tfoot != null)
				msgs = ((InternalEObject)tfoot).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.STRUC_DOC_TABLE__TFOOT, null, msgs);
			if (newTfoot != null)
				msgs = ((InternalEObject)newTfoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.STRUC_DOC_TABLE__TFOOT, null, msgs);
			msgs = basicSetTfoot(newTfoot, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__TFOOT, newTfoot, newTfoot));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<StrucDocTbody> getTbody() {
		if (tbody == null) {
			tbody = new EObjectContainmentEList<StrucDocTbody>(StrucDocTbody.class, this, V3Package.STRUC_DOC_TABLE__TBODY);
		}
		return tbody;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getBorder() {
		return border;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBorder(String newBorder) {
		String oldBorder = border;
		border = newBorder;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__BORDER, oldBorder, border));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCellpadding() {
		return cellpadding;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCellpadding(String newCellpadding) {
		String oldCellpadding = cellpadding;
		cellpadding = newCellpadding;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__CELLPADDING, oldCellpadding, cellpadding));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCellspacing() {
		return cellspacing;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCellspacing(String newCellspacing) {
		String oldCellspacing = cellspacing;
		cellspacing = newCellspacing;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__CELLSPACING, oldCellspacing, cellspacing));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FrameType getFrame() {
		return frame;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setFrame(FrameType newFrame) {
		FrameType oldFrame = frame;
		frame = newFrame == null ? FRAME_EDEFAULT : newFrame;
		boolean oldFrameESet = frameESet;
		frameESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__FRAME, oldFrame, frame, !oldFrameESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetFrame() {
		FrameType oldFrame = frame;
		boolean oldFrameESet = frameESet;
		frame = FRAME_EDEFAULT;
		frameESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, V3Package.STRUC_DOC_TABLE__FRAME, oldFrame, FRAME_EDEFAULT, oldFrameESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetFrame() {
		return frameESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getID() {
		return iD;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setID(String newID) {
		String oldID = iD;
		iD = newID;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__ID, oldID, iD));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLanguage() {
		return language;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLanguage(String newLanguage) {
		String oldLanguage = language;
		language = newLanguage;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__LANGUAGE, oldLanguage, language));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public RulesType getRules() {
		return rules;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRules(RulesType newRules) {
		RulesType oldRules = rules;
		rules = newRules == null ? RULES_EDEFAULT : newRules;
		boolean oldRulesESet = rulesESet;
		rulesESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__RULES, oldRules, rules, !oldRulesESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetRules() {
		RulesType oldRules = rules;
		boolean oldRulesESet = rulesESet;
		rules = RULES_EDEFAULT;
		rulesESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, V3Package.STRUC_DOC_TABLE__RULES, oldRules, RULES_EDEFAULT, oldRulesESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetRules() {
		return rulesESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public List<String> getStyleCode() {
		return styleCode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setStyleCode(List<String> newStyleCode) {
		List<String> oldStyleCode = styleCode;
		styleCode = newStyleCode;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__STYLE_CODE, oldStyleCode, styleCode));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getSummary() {
		return summary;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSummary(String newSummary) {
		String oldSummary = summary;
		summary = newSummary;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__SUMMARY, oldSummary, summary));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getWidth() {
		return width;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setWidth(String newWidth) {
		String oldWidth = width;
		width = newWidth;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.STRUC_DOC_TABLE__WIDTH, oldWidth, width));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case V3Package.STRUC_DOC_TABLE__CAPTION:
				return basicSetCaption(null, msgs);
			case V3Package.STRUC_DOC_TABLE__COL:
				return ((InternalEList<?>)getCol()).basicRemove(otherEnd, msgs);
			case V3Package.STRUC_DOC_TABLE__COLGROUP:
				return ((InternalEList<?>)getColgroup()).basicRemove(otherEnd, msgs);
			case V3Package.STRUC_DOC_TABLE__THEAD:
				return basicSetThead(null, msgs);
			case V3Package.STRUC_DOC_TABLE__TFOOT:
				return basicSetTfoot(null, msgs);
			case V3Package.STRUC_DOC_TABLE__TBODY:
				return ((InternalEList<?>)getTbody()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case V3Package.STRUC_DOC_TABLE__CAPTION:
				return getCaption();
			case V3Package.STRUC_DOC_TABLE__COL:
				return getCol();
			case V3Package.STRUC_DOC_TABLE__COLGROUP:
				return getColgroup();
			case V3Package.STRUC_DOC_TABLE__THEAD:
				return getThead();
			case V3Package.STRUC_DOC_TABLE__TFOOT:
				return getTfoot();
			case V3Package.STRUC_DOC_TABLE__TBODY:
				return getTbody();
			case V3Package.STRUC_DOC_TABLE__BORDER:
				return getBorder();
			case V3Package.STRUC_DOC_TABLE__CELLPADDING:
				return getCellpadding();
			case V3Package.STRUC_DOC_TABLE__CELLSPACING:
				return getCellspacing();
			case V3Package.STRUC_DOC_TABLE__FRAME:
				return getFrame();
			case V3Package.STRUC_DOC_TABLE__ID:
				return getID();
			case V3Package.STRUC_DOC_TABLE__LANGUAGE:
				return getLanguage();
			case V3Package.STRUC_DOC_TABLE__RULES:
				return getRules();
			case V3Package.STRUC_DOC_TABLE__STYLE_CODE:
				return getStyleCode();
			case V3Package.STRUC_DOC_TABLE__SUMMARY:
				return getSummary();
			case V3Package.STRUC_DOC_TABLE__WIDTH:
				return getWidth();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case V3Package.STRUC_DOC_TABLE__CAPTION:
				setCaption((StrucDocCaption)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__COL:
				getCol().clear();
				getCol().addAll((Collection<? extends StrucDocCol>)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__COLGROUP:
				getColgroup().clear();
				getColgroup().addAll((Collection<? extends StrucDocColgroup>)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__THEAD:
				setThead((StrucDocThead)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__TFOOT:
				setTfoot((StrucDocTfoot)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__TBODY:
				getTbody().clear();
				getTbody().addAll((Collection<? extends StrucDocTbody>)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__BORDER:
				setBorder((String)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__CELLPADDING:
				setCellpadding((String)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__CELLSPACING:
				setCellspacing((String)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__FRAME:
				setFrame((FrameType)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__ID:
				setID((String)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__LANGUAGE:
				setLanguage((String)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__RULES:
				setRules((RulesType)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__STYLE_CODE:
				setStyleCode((List<String>)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__SUMMARY:
				setSummary((String)newValue);
				return;
			case V3Package.STRUC_DOC_TABLE__WIDTH:
				setWidth((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case V3Package.STRUC_DOC_TABLE__CAPTION:
				setCaption((StrucDocCaption)null);
				return;
			case V3Package.STRUC_DOC_TABLE__COL:
				getCol().clear();
				return;
			case V3Package.STRUC_DOC_TABLE__COLGROUP:
				getColgroup().clear();
				return;
			case V3Package.STRUC_DOC_TABLE__THEAD:
				setThead((StrucDocThead)null);
				return;
			case V3Package.STRUC_DOC_TABLE__TFOOT:
				setTfoot((StrucDocTfoot)null);
				return;
			case V3Package.STRUC_DOC_TABLE__TBODY:
				getTbody().clear();
				return;
			case V3Package.STRUC_DOC_TABLE__BORDER:
				setBorder(BORDER_EDEFAULT);
				return;
			case V3Package.STRUC_DOC_TABLE__CELLPADDING:
				setCellpadding(CELLPADDING_EDEFAULT);
				return;
			case V3Package.STRUC_DOC_TABLE__CELLSPACING:
				setCellspacing(CELLSPACING_EDEFAULT);
				return;
			case V3Package.STRUC_DOC_TABLE__FRAME:
				unsetFrame();
				return;
			case V3Package.STRUC_DOC_TABLE__ID:
				setID(ID_EDEFAULT);
				return;
			case V3Package.STRUC_DOC_TABLE__LANGUAGE:
				setLanguage(LANGUAGE_EDEFAULT);
				return;
			case V3Package.STRUC_DOC_TABLE__RULES:
				unsetRules();
				return;
			case V3Package.STRUC_DOC_TABLE__STYLE_CODE:
				setStyleCode(STYLE_CODE_EDEFAULT);
				return;
			case V3Package.STRUC_DOC_TABLE__SUMMARY:
				setSummary(SUMMARY_EDEFAULT);
				return;
			case V3Package.STRUC_DOC_TABLE__WIDTH:
				setWidth(WIDTH_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case V3Package.STRUC_DOC_TABLE__CAPTION:
				return caption != null;
			case V3Package.STRUC_DOC_TABLE__COL:
				return col != null && !col.isEmpty();
			case V3Package.STRUC_DOC_TABLE__COLGROUP:
				return colgroup != null && !colgroup.isEmpty();
			case V3Package.STRUC_DOC_TABLE__THEAD:
				return thead != null;
			case V3Package.STRUC_DOC_TABLE__TFOOT:
				return tfoot != null;
			case V3Package.STRUC_DOC_TABLE__TBODY:
				return tbody != null && !tbody.isEmpty();
			case V3Package.STRUC_DOC_TABLE__BORDER:
				return BORDER_EDEFAULT == null ? border != null : !BORDER_EDEFAULT.equals(border);
			case V3Package.STRUC_DOC_TABLE__CELLPADDING:
				return CELLPADDING_EDEFAULT == null ? cellpadding != null : !CELLPADDING_EDEFAULT.equals(cellpadding);
			case V3Package.STRUC_DOC_TABLE__CELLSPACING:
				return CELLSPACING_EDEFAULT == null ? cellspacing != null : !CELLSPACING_EDEFAULT.equals(cellspacing);
			case V3Package.STRUC_DOC_TABLE__FRAME:
				return isSetFrame();
			case V3Package.STRUC_DOC_TABLE__ID:
				return ID_EDEFAULT == null ? iD != null : !ID_EDEFAULT.equals(iD);
			case V3Package.STRUC_DOC_TABLE__LANGUAGE:
				return LANGUAGE_EDEFAULT == null ? language != null : !LANGUAGE_EDEFAULT.equals(language);
			case V3Package.STRUC_DOC_TABLE__RULES:
				return isSetRules();
			case V3Package.STRUC_DOC_TABLE__STYLE_CODE:
				return STYLE_CODE_EDEFAULT == null ? styleCode != null : !STYLE_CODE_EDEFAULT.equals(styleCode);
			case V3Package.STRUC_DOC_TABLE__SUMMARY:
				return SUMMARY_EDEFAULT == null ? summary != null : !SUMMARY_EDEFAULT.equals(summary);
			case V3Package.STRUC_DOC_TABLE__WIDTH:
				return WIDTH_EDEFAULT == null ? width != null : !WIDTH_EDEFAULT.equals(width);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (border: ");
		result.append(border);
		result.append(", cellpadding: ");
		result.append(cellpadding);
		result.append(", cellspacing: ");
		result.append(cellspacing);
		result.append(", frame: ");
		if (frameESet) result.append(frame); else result.append("<unset>");
		result.append(", iD: ");
		result.append(iD);
		result.append(", language: ");
		result.append(language);
		result.append(", rules: ");
		if (rulesESet) result.append(rules); else result.append("<unset>");
		result.append(", styleCode: ");
		result.append(styleCode);
		result.append(", summary: ");
		result.append(summary);
		result.append(", width: ");
		result.append(width);
		result.append(')');
		return result.toString();
	}

} //StrucDocTableImpl
